package thread;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class SignTread extends Thread{
	private ServerSocket server;
	private Socket socket;
	
	@Override
	public void run() {
		try {
			server = new ServerSocket(8009);
			while(true){
				socket = server.accept();
				BufferedReader readers = new BufferedReader(new InputStreamReader(socket.getInputStream()));
				BufferedWriter writers = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
				
				new SignChildThread(writers, readers).start();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
